package com.cskaoyan.demo6.service;

import com.cskaoyan.demo6.annotation.Log;
import com.cskaoyan.demo6.bean.Admin;
import com.cskaoyan.demo6.mapper.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;
@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    AdminMapper adminMapper;
    @Log(type = "管理操作",action = "添加")
    @Override
    public Map<String, Object> insert(Admin admin) {
        adminMapper.insert(admin);
        Map<String, Object> result = new HashMap<>();
        result.put("code", 404);
        result.put("msg", "输入的参数错误");
        result.put("data", null);
        return result;
    }
}
